Ext.define('PW.store.MeusPapeis', {
	extend : 'Ext.data.Store',
	model : 'PW.model.MeusPapeis',
	autoLoad : false,
	storeId: 'MeusPapeis',
	proxy : {
		type : 'rest',
		actionMethods : {
			create : 'POST',
			read : 'GET',
			update : 'POST',
			destroy : 'PUT'
		},
		url : 'PServlet',
		extraParams : {
			action_id : 3,
			id_usuario: PW.controller.VariaveisUteis.id_usuario
		},
		reader : {
			type : 'json',
			root : 'meusPapeis',
			successProperty : 'success'
		},
		writer: {
			type: 'json',
			root: 'meusPapeis'
		}
	},
	listeners: {
		'beforeload': function(store, options){
			store.proxy.extraParams.id_usuario = PW.controller.VariaveisUteis.id_usuario;
		}
	}
});